### Function Description

Gets the value of the job instance global variable

### Request Parameters

#### Interface parameters

| Fields          | Type   | Required | Description                                                                                                 |
|-----------------|--------|----------|-------------------------------------------------------------------------------------------------------------|
| bk_scope_type   | string | yes      | Resource scope type. Optional values: biz - Business，biz_set - Business Set                                 |
| bk_scope_id     | string | yes      | Resource scope ID. Corresponds to bk_scope_type, which means business ID or business set ID                 |
| bk_biz_id       | long   | yes      | Deprecated. Business ID. This field has been deprecated and replaced by the field bk_scope_type+bk_scope_id |
| job_instance_id | long   | yes      | Job instance ID                                                                                             |

### Example of request

- GET

```json
/api/v3/get_job_instance_global_var_value?bk_scope_type=biz&bk_scope_id=1&job_instance_id=100
```

### Example of responses

```json
{
    "result": true,
    "code": 0,
    "data": {
        "job_instance_id": 100,
        "step_instance_var_list": [
            {
                "step_instance_id": 292778,
                "global_var_list": [
                    {
                        "name": "aa",
                        "value": "AA",
                        "type": 1
                    },
                    {
                        "name": "password",
                        "value": "mypassword",
                        "type": 4
                    }
                ]
            },
            {
                "step_instance_id": 292779,
                "global_var_list": [
                    {
                        "name": "aa",
                        "value": "AAAA",
                        "type": 1
                    },
                    {
                        "name": "password",
                        "value": "mypassword",
                        "type": 4
                    }
                ]
            }
        ]
    },
    "job_request_id": "xxx"
}

```

### Response Description

{% include '_generic_response.md.j2' %}

#### data

| Fields                 | Type  | Never null | Description                                                                    |
|------------------------|-------|------------|--------------------------------------------------------------------------------|
| job_instance_id        | long  | yes        | Job instance ID                                                                |
| step_instance_var_list | array | no         | Job step instance global variable value. See step_instance_var for definitions |

#### step_instance_var

| Fields           | Type  | Never null | Description                                                   |
|------------------|-------|------------|---------------------------------------------------------------|
| step_instance_id | long  | yes        | Step instance ID                                              |
| global_var_list  | array | no         | For global variable value list, see global_var for definition |

#### global_var

| Fields | Type   | Never null | Description                                                                                                   |
|--------|--------|------------|---------------------------------------------------------------------------------------------------------------|
| id     | long   | yes        | Global variable id, unique identification. If the id is empty, then name is used as the unique identification |
| name   | string | yes        | Global variable name                                                                                          |
| value  | string | no         | Values of global variables of String, Ciphertext, Namespace, and Array types                                  |
| server | object | no         | For the value of the host type global variable, see server definition                                         |

{% include '_generic_server.md.j2' %}
